Challenge infections with Eimeria. Here I am presenting some summary statistics on the laboratory infection of mice with different Eimeria strains.

Here is a data frame containing all information derived from the experimental infections with Eimeria.

#### Read the file
CI <- read.csv("https://raw.githubusercontent.com/derele/Eimeria_Lab/master/data_products/Challenge_infections.csv")

Wrangling

## # A tibble: 2,984 × 98
##    EH_ID experiment primary_infecti… challenge_infec… mouse_strain labels weight
##    <chr> <chr>      <chr>            <chr>            <chr>        <chr>   <dbl>
##  1 LM02… E57        E88              E64              BUSNA_STRA   E57aA…   22.2
##  2 LM02… E57        E88              E64              BUSNA_STRA   E57aB…   19.1
##  3 LM02… E57        E88              E64              BUSNA_STRA   E57bx…   22.9
##  4 LM02… E57        E88              E64              BUSNA_STRA   E57aP…   22  
##  5 LM02… E57        E88              E64              BUSNA_STRA   E57aF…   20.0
##  6 LM02… E57        E88              E64              BUSNA_STRA   E57aN…   22.1
##  7 LM02… E57        E88              E64              BUSNA_STRA   E57bx…   22.9
##  8 LM02… E57        E88              E64              BUSNA_STRA   E57bx…   23.2
##  9 LM02… E57        E88              E64              BUSNA_STRA   E57bx…   23.1
## 10 LM02… E57        E88              E64              BUSNA_STRA   E57aG…   21.0
## # … with 2,974 more rows, and 91 more variables: weight_dpi0 <dbl>,
## #   relative_weight <dbl>, feces_weight <dbl>, dpi <int>, infection <chr>,
## #   oocyst_sq1 <int>, oocyst_sq2 <int>, oocyst_sq3 <int>, oocyst_sq4 <int>,
## #   dilution <dbl>, OO4sq <int>, OOC <dbl>, infection_history <chr>,
## #   Eim_MC <lgl>, delta <dbl>, IFNy_CEWE <dbl>, IFNy_MES <dbl>, CXCR3 <dbl>,
## #   IRG6 <dbl>, IL.12 <dbl>, CASP1 <dbl>, CXCL9 <dbl>, CXCR3_bio <dbl>,
## #   IDO1 <dbl>, IFNy <dbl>, IL.10 <dbl>, IL.12A <dbl>, IL1RN <dbl>, …

Let’s add a column with the parasite names

Let’s add a column with the heterologous and homologous infections

CI <- CI %>%
  dplyr::mutate(infection_type = case_when(
    infection_history == "E88_E64" ~ "heterologous_ferrisi",
    infection_history == "E88_UNI" ~ "falciformis_UNI",
    infection_history == "E64_E64" ~ "homologous_ferrisi",
    infection_history == "E64_UNI" ~ "ferrisi_UNI",
    infection_history == "Eflab_E88" ~ "homologous_falciformis",
    infection_history == "Eflab_E64" ~ "heterologous_ferrisi",
    infection_history == "Eflab_UNI" ~ "falciformis_UNI",
    infection_history == "E64_E88" ~ "heterologous_falciformis",
    infection_history == "E139_E88" ~ "homologous_falciformis",
    infection_history == "E139_E64" ~ "heterologous_ferrisi",
    infection_history == "E139_UNI" ~ "falciformis_UNI",
    infection_history == "UNI_E88" ~ "UNI_falciformis",
    infection_history == "UNI_E64" ~ "UNI_ferrisi",
    infection_history == "UNI_UNI" ~ "UNI",
    infection_history == "E88_E88" ~ "homologous_falciformis",
    TRUE ~ ""))

Summary statistics on experimental design

Summarizing data by each mouse

How many mice do we have in each infection ? (primary or challenge infection)

## # A tibble: 2 × 2
##   infection total_mice
##   <chr>          <int>
## 1 challenge        132
## 2 primary          153

How many experiments do we have? How many mice are in each experiment?

## # A tibble: 5 × 2
##   experiment total_mice
##   <chr>           <int>
## 1 E10                52
## 2 E11                55
## 3 E57               106
## 4 P3                 32
## 5 P4                 40

How many mouse strains do we have?

We here use four wild-derived inbred mouse strains. from these mouse strains F1 hybrids were generated.

Two parental strains represented M. m. domesticus: - SCHUNT (Locality: Schweben, Hessen, Germany [N: 5°0 26′, E: 9°36′] (Martincová et al., 2019))
- STRA (Locality: Straas, Bavaria, Germany [N: 50°11′, E: 11°46′] (Piálek et al., 2008), Two parental strains represented M. m. musculus: - BUSNA (Locality: Buškovice, Bohemia, Czech Republic [N: 5°0 14′, E: 1°3 22′] (Piálek et al., 2008)) - PWD (Locality: Kunratice, Bohemia, Czech Republic [N: 5°0 01′, E: 14 2°9′] (Gregorová & Forejt, 2000))

## `summarise()` has grouped output by 'mouse_strain'. You can override using the
## `.groups` argument.
## # A tibble: 13 × 3
## # Groups:   mouse_strain [13]
##    mouse_strain  hybrid_status       total_mice
##    <chr>         <chr>                    <int>
##  1 BUSNA_BUSNA   F0 M. m. musculus            8
##  2 BUSNA_PWD     F1 M. m. musculus            6
##  3 BUSNA_STRA    F1 hybrid                   10
##  4 NMRI          other                       72
##  5 PWD_BUSNA     F1 M. m. musculus            8
##  6 PWD_PWD       F0 M. m. musculus           56
##  7 PWD_SCHUNT    F1 hybrid                    6
##  8 SCHUNT_PWD    F1 hybrid                    8
##  9 SCHUNT_SCHUNT F0 M. m. domesticus         73
## 10 SCHUNT_STRA   F1 M. m. domesticus          6
## 11 STRA_BUSNA    F1 hybrid                   10
## 12 STRA_SCHUNT   F1 M. m. domesticus         10
## 13 STRA_STRA     F0 M. m. domesticus         12
## # A tibble: 6 × 2
##   hybrid_status       total_mice
##   <chr>                    <int>
## 1 F0 M. m. domesticus         85
## 2 F0 M. m. musculus           64
## 3 F1 hybrid                   34
## 4 F1 M. m. domesticus         16
## 5 F1 M. m. musculus           14
## 6 other                       72

Which Eimeria strains were used?

The three parasite isolates used in this study were isolated from feces of three different M. m. domesticus/M. m. musculus hybrid mice captured in Brandenburg, Germany, in 2016 (capture permit No. 2347/35/2014). The parasite isolates belong to both the most prevalent Eimeria species in this area, namely E. ferrisi (isolate Brandenburg64) and E. falciformis (isolate Brandenburg88)(Jarquín-Díaz et al., 2019). Isolate Brandenburg64 was isolated in a 92% M. m. domesticus individual (hybrid index (HI) = 0.08: Proportion of M. m. musculus alleles in a set of 14 diagnostic markers, see Balard et al. (2020)) and isolate Brandenburg88 in a 80% M. m. domesticus (HI = 0.2).

Prepatency and the peak day of parasite shedding for these isolates were estimated during infection in NMRI laboratory mice (Al-khlifeh et al., 2019) which were also used for serial passaging of the isolates. Previous to the experiment, the isolates had been passaged, respectively, 3 and 4 times in NMRI laboratory mice. Parasite infective forms (oocysts) were recovered by flotation in saturated NaCl solution followed by washing and observation under light microscope (following the protocol described in Clerc et al. (2019)) and stored at room temperature in 1 ml of 2% potassium dichromate for a maximum of 2 months before infection of the wild-derived mice. Oocysts were allowed to sporulate 10 days before infection in a water bath at 30°C

  1. Primary:
## # A tibble: 3 × 2
##   Parasite_primary    total_mice
##   <chr>                    <int>
## 1 Eimeria falciformis         60
## 2 Eimeria ferrisi             69
## 3 uninfected                  24
  1. Further, for the challenge infections
## # A tibble: 3 × 2
##   Parasite_challenge  total_mice
##   <chr>                    <int>
## 1 Eimeria falciformis         27
## 2 Eimeria ferrisi             54
## 3 uninfected                  51

2.6 How many mice died in each infection?

## # A tibble: 2 × 2
##   death     `length(EH_ID)`
##   <chr>               <int>
## 1 challenge             264
## 2 primary                21

2.6.1 From the mice that died in the primary infection, what was the infection status?

## # A tibble: 2 × 2
##   Parasite_primary    total_mice
##   <chr>                    <int>
## 1 Eimeria falciformis         18
## 2 Eimeria ferrisi              3

Most of the mice dying in the first infections are infected with Eimeria falciformis.

3 Summary statistics - Resistance/ Tolerance proxies

3.1 What is the avarege maximum oocysts output for each mouse in the primary and challenge infections?

  1. Visualizing the primary infections `
CIMouse %>%
    filter(infection == "primary")  %>%
  ggplot(aes(max_OOC, color = Parasite_primary, fill = Parasite_primary)) +
  geom_histogram(bins = 30, alpha = 0.5) +
  labs(x = "Oocysts at day of maximal shedding", y = "Number of mice",
       title = "Maximum oocyst shedding per mouse, primary infections") +
    theme_bw()

CIMouse  %>%
    filter(infection == "primary")  %>%
  ggplot(aes(x = Parasite_primary, y = max_OOC, fill = Parasite_primary)) +
  geom_boxplot() +
    theme_bw()

CIMouse  %>%
    filter(infection == "primary")  %>%
  ggplot(aes(x = Parasite_primary, y = max_OOC, fill = Parasite_primary)) +
  geom_violin() +
    theme_bw() 

CIMouse  %>%
    filter(infection == "primary", !Parasite_primary == "uninfected")  %>%
  ggplot(aes(x = Parasite_primary, y = max_OOC, fill = Parasite_primary)) +
  geom_violin(alpha = 0.5) +
    geom_line() +
     stat_summary(fun.y = "median", geom = "point", size = 3) +
    theme_bw() 
## Warning: `fun.y` is deprecated. Use `fun` instead.

CIMouse  %>%
    filter(infection == "primary", !Parasite_primary == "uninfected")  %>%
  ggplot(aes(x = Parasite_primary, y = max_OOC, fill = Parasite_primary)) +
  geom_violin(alpha = 0.5) +
    geom_line() +
     stat_summary(fun.y = "median", geom = "point", size = 3) +
    theme_bw() 
## Warning: `fun.y` is deprecated. Use `fun` instead.

  1. And the challenge infections
CIMouse %>%
  filter(infection == "challenge")  %>%
  ggplot(aes(max_OOC, color = Parasite_challenge, fill = Parasite_challenge)) +
  geom_histogram(bins = 30, alpha = 0.5) +
  labs(x = "Oocysts at day of maximal shedding", y = "Number of mice",
       title = "Maximum oocyst shedding per mouse, challenge infections") +
    theme_bw()
## Warning: Removed 7 rows containing non-finite values (stat_bin).

CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(x = Parasite_challenge, y = max_OOC, fill = Parasite_challenge)) +
  geom_boxplot() +
    theme_bw()
## Warning: Removed 7 rows containing non-finite values (stat_boxplot).

CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(x = Parasite_challenge, y = max_OOC, fill = Parasite_challenge)) +
  geom_violin() +
    theme_bw() 
## Warning: Removed 7 rows containing non-finite values (stat_ydensity).

CIMouse  %>%
    filter(infection == "challenge", !Parasite_challenge == "uninfected")  %>%
  ggplot(aes(x = Parasite_challenge, y = max_OOC, fill = Parasite_challenge)) +
  geom_violin(alpha = 0.5) +
    geom_line() +
     stat_summary(fun.y = "median", geom = "point", size = 3) +
    theme_bw() 
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: Removed 6 rows containing non-finite values (stat_ydensity).
## Warning: Removed 6 rows containing non-finite values (stat_summary).

maximum oocysts output for each mouse strain in each infection?

  1. primary infections:

  2. Challenge infections:

## Warning: Removed 7 rows containing non-finite values (stat_boxplot).

Effect of experiments on oocyst shedding?

  1. primary infections:

  2. Challenge infections:

## Warning: Removed 7 rows containing non-finite values (stat_boxplot).

Patency in primary infections

CI %>%
  group_by("EH_ID") %>%
  filter(infection == "primary") %>%
  ggplot(aes(x = dpi, y = OOC, color = Parasite_primary)) +
  geom_point(position = position_jitterdodge()) +
  labs(x = "Days Post Infection", y = "Oocysts per gram",
       title = "Oocyst shedding in primary infections during the 
       course of infection") +
    theme_bw() 
## Warning: Removed 497 rows containing missing values (geom_point).

Patency in primary infections - experiments

CI %>%
  group_by("EH_ID") %>%
  filter(infection == "primary") %>%
  ggplot(aes(x = dpi, y = OOC, color = Parasite_primary)) +
  geom_point(position = position_jitterdodge()) +
  labs(x = "Days Post Infection", y = "Oocysts per gram",
       title = "Oocyst shedding in primary infections during the 
       course of infection") +
    theme_bw() +
    stat_smooth() +
    facet_wrap(~ experiment)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 497 rows containing non-finite values (stat_smooth).
## Warning: Removed 497 rows containing missing values (geom_point).

Patency in primary infections - mouse strains

CI %>%
  group_by("EH_ID") %>%
  filter(infection == "primary") %>%
  ggplot(aes(x = dpi, y = OOC, color = Parasite_primary)) +
  geom_point(position = position_jitterdodge()) +
  labs(x = "Days Post Infection", y = "Oocysts per gram",
       title = "Oocyst shedding in primary infections during the 
       course of infection") +
    theme_bw() +
    facet_wrap(~ hybrid_status)
## Warning: Removed 497 rows containing missing values (geom_point).

Patency in challenge infections - experiments

CI %>%
  group_by("EH_ID") %>%
  filter(infection == "challenge") %>%
  ggplot(aes(x = dpi, y = OOC, color = Parasite_challenge)) +
  geom_point(position = position_jitterdodge()) +
  labs(x = "Days Post Infection", y = "Oocysts per gram",
       title = "Oocyst shedding in challenge infections during the 
       course of infection") +
    theme_bw() +
    facet_wrap(~ experiment)
## Warning: Removed 167 rows containing missing values (geom_point).

Patency in challenge infections - mouse strains

CI %>%
  group_by("EH_ID") %>%
  filter(infection == "challenge") %>%
  ggplot(aes(x = dpi, y = OOC, color = Parasite_challenge)) +
  geom_point(position = position_jitterdodge()) +
  labs(x = "Days Post Infection", y = "Oocysts per gram",
       title = "Oocyst shedding in challenge infections during the 
       course of infection") +
    theme_bw() +
    facet_wrap(~ hybrid_status)
## Warning: Removed 167 rows containing missing values (geom_point).

What is the average max weight loss output for each mouse in the primary and challenge infections?

  1. Visualizing the primary infections `
CIMouse %>%
    dplyr::filter(infection == "primary") %>%
  ggplot(aes(max_WL, color = Parasite_primary, fill = Parasite_primary)) +
  geom_histogram(bins = 30, alpha = 0.5)  +
    theme_bw()

CIMouse  %>%
    filter(infection == "primary")  %>%
  ggplot(aes(x = Parasite_primary, y = max_WL, fill = Parasite_primary)) +
  geom_boxplot() +
    theme_bw()

CIMouse  %>%
    filter(infection == "primary")  %>%
  ggplot(aes(x = Parasite_primary, y = max_WL, fill = Parasite_primary)) +
  geom_violin(alpha = 0.5) +
    geom_line() +
     stat_summary(fun.y = "median", geom = "point", size = 3) +
    theme_bw() 
## Warning: `fun.y` is deprecated. Use `fun` instead.

  1. And the challenge infections
CIMouse %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(max_WL, color = Parasite_challenge, fill = Parasite_challenge)) +
  geom_histogram(bins = 30, alpha = 0.5) +
    theme_bw()
## Warning: Removed 6 rows containing non-finite values (stat_bin).

CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(x = Parasite_challenge, y = max_WL, fill = Parasite_challenge)) +
  geom_boxplot() +
    theme_bw()
## Warning: Removed 6 rows containing non-finite values (stat_boxplot).

CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(x = Parasite_challenge, y = max_WL, fill = Parasite_challenge)) +
  geom_violin(alpha = 0.5) +
    geom_line() +
     stat_summary(fun.y = "median", geom = "point", size = 3) +
    theme_bw() 
## Warning: `fun.y` is deprecated. Use `fun` instead.
## Warning: Removed 6 rows containing non-finite values (stat_ydensity).
## Warning: Removed 6 rows containing non-finite values (stat_summary).

maximum weight loss output for each mouse strain in each infection?

  1. primary infections:

  2. Challenge infections:

## Warning: Removed 6 rows containing non-finite values (stat_boxplot).

Effect of experiments on weight loss?

  1. primary infections: Weight changes during the course of infection
  2. Primary
CI %>% 
    filter(infection == "primary") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_primary)) +
    geom_jitter() +
    stat_smooth() +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the primary infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

CI %>% 
    filter(infection == "primary") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_primary)) +
    geom_jitter() +
    stat_smooth() +
    facet_wrap(~ mouse_strain) +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the primary infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

CI %>% 
    filter(infection == "primary") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_primary)) +
    geom_jitter() +
    stat_smooth() +
    facet_wrap(~ experiment) +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the primary infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Weight changes during the course of infection 1. challenge

CI %>% 
    filter(infection == "challenge") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_challenge)) +
    geom_jitter() +
    stat_smooth() +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the challenge infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

CI %>% 
    filter(infection == "challenge") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_challenge)) +
    geom_jitter() +
    stat_smooth() +
    facet_wrap(~ mouse_strain) +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the challenge infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

CI %>% 
    filter(infection == "challenge") %>%
    drop_na(weight_dpi0, relative_weight) %>%
    group_by("EH_ID") %>%
    ggplot(aes(x = dpi, y = relative_weight, color = Parasite_challenge)) +
    geom_jitter() +
    stat_smooth() +
    facet_wrap(~ experiment) +
    labs(x = "Days Post Infection", y = "Relative weight to first day",
         title = "Weight changes during the course of the challenge infection") +
    theme_bw()
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'

Tissue infection intensity vs max weight loss - primary

CI  %>%
  group_by("EH_ID") %>%
  filter(infection == "primary", Eim_MC == "TRUE") %>%
  ggplot(aes(x = delta, y = max_WL, color = Parasite_primary)) +
  geom_jitter() +
  labs(x = "Delta Ct, Infection intensity", y = "Maximum weight loss of each mouse",
       title = "Maximum Weight loss for each mouse and infection intensity, 
       primary infections") +
    geom_smooth(method = "lm") +
    theme_bw()
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (stat_smooth).
## Warning: Removed 11 rows containing missing values (geom_point).

CI  %>%
  group_by("EH_ID") %>%
  filter(infection == "primary", Eim_MC == "TRUE") %>%
  ggplot(aes(x = delta, y = max_WL, color = Parasite_primary)) +
  geom_jitter() +
  labs(x = "Delta Ct, Infection intensity", y = "Maximum weight loss of each mouse",
       title = "Maximum Weight loss for each mouse and infection intensity, 
       primary infections") +
    geom_smooth(method = "lm") +
    theme_bw() +
    facet_wrap(~experiment)
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (stat_smooth).
## Removed 11 rows containing missing values (geom_point).

Tissue infection intensity vs max weight loss - challenge

CI  %>%
  group_by("EH_ID") %>%
  filter(infection == "challenge", Eim_MC == "TRUE") %>%
  ggplot(aes(x = delta, y = max_WL, color = Parasite_challenge)) +
  geom_jitter() +
  labs(x = "Delta Ct, Infection intensity", y = "Maximum weight loss of each mouse",
       title = "Maximum Weight loss for each mouse and infection intensity, 
       challenge infections") +
    geom_smooth(method = "lm") +
    theme_bw()
## `geom_smooth()` using formula 'y ~ x'

CI  %>%
  group_by("EH_ID") %>%
  filter(infection == "challenge", Eim_MC == "TRUE") %>%
  ggplot(aes(x = delta, y = max_WL, color = Parasite_challenge)) +
  geom_jitter() +
  labs(x = "Delta Ct, Infection intensity", y = "Maximum weight loss of each mouse",
       title = "Maximum Weight loss for each mouse and infection intensity, 
       challenge infections") +
    geom_smooth(method = "lm") +
    theme_bw()  +
    facet_wrap(~experiment)
## `geom_smooth()` using formula 'y ~ x'

CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(y = max_WL, fill = infection_type)) +
  geom_boxplot() +
    theme_bw() +
    labs(x = "Infection type", y = "Maximum weight loss of each mouse",
       title = "Do heterologous infections induce protective immunity?")
## Warning: Removed 6 rows containing non-finite values (stat_boxplot).

#remove outliers in
CIMouse  %>%
    filter(infection == "challenge")  %>%
  ggplot(aes(x = infection_type, y = max_WL, color = infection_type)) +
  geom_boxplot(outlier.alpha = 0) +
   geom_jitter(width = 0.2) +
    theme_bw() +
    labs(x = "Infection type", y = "Maximum weight loss of each mouse",
       title = "Do heterologous infections induce protective immunity?")
## Warning: Removed 6 rows containing non-finite values (stat_boxplot).
## Warning: Removed 6 rows containing missing values (geom_point).

How is our max weight loss data distributed?

CIMouse %>% filter(infection == "challenge", !max_WL == "Inf") -> Challenge

hist(Challenge$max_WL)

Data appear to be left-skewed (negative skewed)

The histograms show that the two distributions have a similar pattern, they are both negatively skewed, so the medians can be used to summarise the differences

summary(Challenge$max_WL)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   73.45   89.05   94.22   92.40   97.26  100.00
pastecs::stat.desc(Challenge$max_WL)
##      nbr.val     nbr.null       nbr.na          min          max        range 
## 1.260000e+02 0.000000e+00 0.000000e+00 7.344595e+01 1.000000e+02 2.655405e+01 
##          sum       median         mean      SE.mean CI.mean.0.95          var 
## 1.164275e+04 9.422345e+01 9.240280e+01 5.756736e-01 1.139330e+00 4.175641e+01 
##      std.dev     coef.var 
## 6.461920e+00 6.993209e-02

Results are not following a normal distribution, therefore I will continue with a non- parametrical statistical test.

The Kruskal–Wallis test by ranks, Kruskal–Wallis H test[1] (named after William Kruskal and W. Allen Wallis), or one-way ANOVA on ranks[1] is a non-parametric method for testing whether samples originate from the same distribution

t is used to test the null hypothesis which states that ‘k’ number of samples has been drawn from the same population or the identical population with the same or identical median

A significant Kruskal–Wallis test indicates that at least one sample stochastically dominates one other sample

IT <- Challenge %>% 
  select(c(infection_type, max_WL)) 
## Adding missing grouping variables: `EH_ID`
IT <- as.data.frame(IT) %>% 
  pivot_wider(names_from = "infection_type", values_from = "max_WL") %>%
  select(-EH_ID)

#The Shapiro–Wilk test is a test of normality in frequentist statistics
# The null-hypothesis of this test is that the population is normally distributed. Thus, if the p value is less than the chosen alpha level, then the null hypothesis is rejected and there is evidence that the data tested are not normally distributed. On the other hand, if the p value is greater than the chosen alpha level, then the null hypothesis (that the data came from a normally distributed population) can not be rejected (e.g., for an alpha level of .05, a data set with a p value of less than .05 rejects the null hypothesis that the data are from a normally distributed population).[4]

#In statistics, the Mann–Whitney U test (also called the Mann–Whitney–Wilcoxon (MWW/MWU), Wilcoxon rank-sum test, or Wilcoxon–Mann–Whitney test) is a nonparametric test of the null hypothesis that, for randomly selected values X and Y from two populations, the probability of X being greater than Y is equal to the probability of Y being greater than X.

shapiro.test(IT$heterologous_ferrisi) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$heterologous_ferrisi
## W = 0.95988, p-value = 0.5701
shapiro.test(IT$falciformis_UNI) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$falciformis_UNI
## W = 0.90077, p-value = 0.08268
shapiro.test(IT$homologous_ferrisi) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$homologous_ferrisi
## W = 0.94082, p-value = 0.1701
shapiro.test(IT$ferrisi_UNI) #Not normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$ferrisi_UNI
## W = 0.87512, p-value = 0.00549
shapiro.test(IT$homologous_falciformis) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$homologous_falciformis
## W = 0.96245, p-value = 0.833
shapiro.test(IT$heterologous_falciformis) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$heterologous_falciformis
## W = 0.93657, p-value = 0.5155
shapiro.test(IT$UNI_falciformis) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$UNI_falciformis
## W = 0.82368, p-value = 0.09493
shapiro.test(IT$UNI_ferrisi)  #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$UNI_ferrisi
## W = 0.96608, p-value = 0.8593
shapiro.test(IT$UNI) #normal distr
## 
##  Shapiro-Wilk normality test
## 
## data:  IT$UNI
## W = 0.91476, p-value = 0.3506
kwTest <- kruskal.test(IT)
print(kwTest)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  IT
## Kruskal-Wallis chi-squared = 42.493, df = 8, p-value = 1.094e-06

We have 8 df (degrees of freedom), beacause there are 8 groups (n - 1). We have a tiny teeny p value, which means we have a significant difference in at least one of the group.

Let’s compare the weight loss between previously uninfected mice and infections with either falciformis or ferrisi.

wilcox.test(IT$ferrisi_UNI, IT$UNI)
## Warning in wilcox.test.default(IT$ferrisi_UNI, IT$UNI): cannot compute exact p-
## value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  IT$ferrisi_UNI and IT$UNI
## W = 103, p-value = 0.7242
## alternative hypothesis: true location shift is not equal to 0

Heterologous infection with current falciformis - homologous falciformis

wilcox.test(IT$heterologous_falciformis, IT$homologous_falciformis)
## 
##  Wilcoxon rank sum exact test
## 
## data:  IT$heterologous_falciformis and IT$homologous_falciformis
## W = 22, p-value = 0.122
## alternative hypothesis: true location shift is not equal to 0

Ferrisi is not protective against falciformis.

Heterologous infection with current ferrisi - homologous ferrisi

wilcox.test(IT$heterologous_ferrisi, IT$homologous_ferrisi)
## Warning in wilcox.test.default(IT$heterologous_ferrisi, IT$homologous_ferrisi):
## cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  IT$heterologous_ferrisi and IT$homologous_ferrisi
## W = 179, p-value = 0.2354
## alternative hypothesis: true location shift is not equal to 0

Heterologous falc - heterologous ferri

wilcox.test(IT$heterologous_falciformis, IT$heterologous_ferrisi)
## Warning in wilcox.test.default(IT$heterologous_falciformis,
## IT$heterologous_ferrisi): cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  IT$heterologous_falciformis and IT$heterologous_ferrisi
## W = 38, p-value = 0.009522
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(IT$UNI_falciformis, IT$UNI_ferrisi)
## 
##  Wilcoxon rank sum exact test
## 
## data:  IT$UNI_falciformis and IT$UNI_ferrisi
## W = 21, p-value = 0.5287
## alternative hypothesis: true location shift is not equal to 0